<?php echo $this->render($this->includeDir . '/toolbar.php');?>
<?php 

	/*===============================================
	 * Start - Hien thi cac phan tu trong database 
	 *===============================================*/	


$config = new Zendvn_Controller_Config(array('module'=>$this->arrParam['module'],
												'fileConfig'=>'news1Category.ini'));
	
	$empty 			= '<em style="color:#ccc">Đang cập nhật...</em>';
	
	$name 			= Zendvn_Filter_Filter::filterContent($this->Item['name'],'filter');
	$parents 		= ($this->Item['parents'] == '')? $this->translate('root') : Zendvn_Filter_Filter::filterContent($this->Item['parents'],'filter');
	
		$picture_url	= !empty($this->Item['picture'])?$this->config['thumbUrl'] . '/' . $this->Item['picture']:'Empty';
	
	if($picture_url == 'Empty'){
		$picture	= $empty;
	}else if(!file_exists($this->config['thumbDir'] . '/' . $this->Item['picture'])){
		$picture	= '<em style="color:#ccc">File không tồn tại...</em>';
	}else{
		$picture	= $this->cmsImage('category_picture', $picture_url, array('width' => '150px'));
	}
	
	$description	= Zendvn_Filter_Filter::filterContent($this->Item['description']);
	$html_descript	= !empty($this->Item['html_descript'])?Zendvn_Filter_Filter::filterContent($this->Item['html_descript'],'filter'):$empty;
	$html_keyword	= !empty($this->Item['html_keyword'])?Zendvn_Filter_Filter::filterContent($this->Item['html_keyword'],'filter'):$empty;	
	
	$ordering 		= $this->Item['ordering'];
	$created 		= $this->Item['created'];
	$created_by 	= Zendvn_Filter_Filter::filterContent($this->Item['created_by'],'filter');
	
	$modified 		= (!empty($this->Item['modified']) && $this->Item['modified']!= '0000-00-00 00:00:00')?$this->Item['modified']:$empty;
	$modified_by 	= !empty($this->Item['modified_by'])?Zendvn_Filter_Filter::filterContent($this->Item['modified_name'],'filter'):$empty;
	
	$img = ($this->Item['status'] == 'active') ? 'active.png' : 'inactive.png';
	$src = "images/small-icons/" . $img;
	$status = '<img src="' . $src . '" />';
	
					 
	//created	created_by	modified	modified_by
	$arrRow = array(
					array('label'=>$this->translate('Name'),'info'=>$name),					
					array('label'=>$this->translate('Parents'),'info'=>$parents),						
					array('label'=>$this->translate('Picture'),'info'=>$picture),	
					array('label'=>$this->translate('Created'),'info'=>$created),
					array('label'=>$this->translate('Created by'),'info'=>$created_by),
					array('label'=>$this->translate('Modified'),'info'=>$modified),
					array('label'=>$this->translate('Modified by'),'info'=>$modified_by),
					array('label'=>$this->translate('Status'),'info'=>$status),
					array('label'=>$this->translate('Ordering'),'info'=>$ordering),
					array('label'=>$this->translate('Description'),'info'=>$description),
					array('label'=>$this->translate('Html descript'),'info'=>$html_descript),
					array('label'=>$this->translate('Html keywords'),'info'=>$html_keyword),
				);
		
?>
<div id="element-box">
	<div class="m">
		<div class="form-table">
            	<fieldset class="admin-fieldset">
                <legend class="admin-legend"><?php echo $this->translate('Form Detail');?></legend>
            	<table width="100%" border="0">
                	<?php  echo $this->partialLoop('row-info.php',$arrRow);?>
                </table>
                <div class="clr"></div>
                </fieldset>
            </div>
            <div class="clr"></div>
	</div>
</div>
